package com.tudouji.project.copy.domain;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.framework.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 待同步数据明细对象 copytokditem
 *
 * @author wf
 * @date 2021-01-11
 */
@Data
public class Copytokditem {
	private static final long serialVersionUID = 1L;

	/** 主键 */
	private Long id;

	/** 主表id */
	@Excel(name = "主表id")
	private Long ctkdid;

	/** 库房id */
	@Excel(name = "库房id")
	private String srguid;

	/** 库房名称 */
	@Excel(name = "库房名称")
	private String srname;

	/** 金蝶系统库房编码 */
	@Excel(name = "金蝶系统库房编码")
	private String srKdn;

	/** 库间id */
	@Excel(name = "库间id")
	private String shrguid;

	/** 库间名称 */
	@Excel(name = "库间名称")
	private String shrname;

	/** 金蝶系统库间编码 */
	@Excel(name = "金蝶系统库间编码")
	private String shrKdn;

	/** 库存组织id */
	@Excel(name = "库存组织id")
	private String orgguid;

	/** 金蝶系统组织编码 */
	@Excel(name = "金蝶系统组织编码")
	private String orgKdn;

	/** 库存组织名称 */
	@Excel(name = "库存组织名称")
	private String orgname;

	/** 产品id */
	@Excel(name = "产品id")
	private String productguid;

	/** 产品名称 */
	@Excel(name = "产品名称")
	private String productname;

	/** 规格id */
	@Excel(name = "规格id")
	private String spguid;

	/** 规格名称 */
	@Excel(name = "规格名称")
	private String spname;

	/** 金蝶系统物料编码 */
	@Excel(name = "金蝶系统物料编码")
	private String materialKdn;

	/** ERP系统数量 */
	@Excel(name = "ERP系统数量")
	private BigDecimal qty;

	/** 金蝶系统数量 */
	@Excel(name = "金蝶系统数量")
	private BigDecimal kdqty;

	/** 是否赠送 */
	@Excel(name = "是否赠送")
	private String ispresent;

	/** 单价 */
	@Excel(name = "单价")
	private BigDecimal price;

	/** 内部结算价 */
	@Excel(name = "内部结算价")
	private BigDecimal innerPrice;

	/** 价税合计 */
	@Excel(name = "价税合计")
	private BigDecimal amount;

	/** 销售组织 */
	@Excel(name = "销售组织")
	private String saleorgid;

	/** 销售组织金蝶系统编码 */
	@Excel(name = "销售组织金蝶系统编码")
	private String saleorgKdn;

	/** 销售人员或采购员ERP用户id */
	@Excel(name = "销售人员或采购员ERP用户id")
	private String owner;

	/** 金蝶系统人员编码 */
	@Excel(name = "金蝶系统人员编码")
	private String ownerKdn;

	/** 结算供应商id */
	@Excel(name = "结算供应商id")
	private Long balancesupplierid;

	/** 金蝶系统结算供应商编码 */
	@Excel(name = "金蝶系统结算供应商编码")
	private String balancesupplierKdn;

	/** ERP应收客户id */
	@Excel(name = "ERP应收客户id")
	private String balancecustomerid;

	/** 金蝶系统应收客户编号 */
	@Excel(name = "金蝶系统应收客户编号")
	private String balancecustomerKdn;

	/** ERP订货客户id */
	@Excel(name = "ERP订货客户id")
	private String ordercustomerid;

	/** 金蝶系统订货客户编码 */
	@Excel(name = "金蝶系统订货客户编码")
	private String ordercustomerKdn;

	/** ERP系统收款客户id */
	@Excel(name = "ERP系统收款客户id")
	private String paymentcustomerid;

	/** 金蝶系统收款客户编码 */
	@Excel(name = "金蝶系统收款客户编码")
	private String paymentcustomerKdn;

	private Copytokd copytokd;

	private Integer status;

	private String unit;

	private Long supplierid;

	private String supplierKdn;

	private String suppliername;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date copyTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date lastCopyTime;

	private String copyRemark;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createdate;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date Lastupdatetime;

	private BigDecimal loadcount;

	private String kingdeeunit;

	private String kdupdatetype;

	private String departmentid;

	private String departmentname;

	private String departmentkdnum;

	private Long unitid;

	private String cosguid;

	private String coskdnum;

	private String cosname;

	private BigDecimal auxiliary;

	private BigDecimal taxrate;

	private BigDecimal tax;

	private BigDecimal notaxprice;

	private BigDecimal notaxamount;

	private String toSRGuid;

	private String toSRName;

	private String toSHRguid;

	private String toSHRKdn;

	private String toSHRName;

	private Date inDate;

	private Date outDate;

	//20230306 记录出库单或入库单明细id
	private String whinoroutitemGuid;

	public String getValueByParam(String param) {
		try {
			Field field = this.getClass().getDeclaredField(param);
			// 设置对象的访问权限，保证对private的属性的访问
			field.setAccessible(true);
			return field.get(this) == null ? "" : field.get(this).toString();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
}